package futuremode;

/**
 * future模式
 */
public class Main {

    public static void main(String[] args) {
        Client client = new Client();
        Data data1 = client.request("name1");
        System.out.println("请求完毕!!");
        Data data2 = client.request("name2");
        try {
//            Thread.sleep(2000);
        } catch (Exception e) {
            // TODO: handle exception
        }
        System.out.println("获取的数据:" +data1.getResult());
        System.out.println("获取的数据:" +data2.getResult());
    }

}
